package com.neusoft.demo11;

/**
 * 动态可变参数
 */
public class DyTest {

    public void m1(int a,int b) {
        System.out.println(a + b);
    }

    public void m2(String sql,Object...values) {
        for(int i = 0;i<values.length;i++) {
            System.out.println(values[i]);
        }

    }

    public static void main(String[] args) {
        DyTest dyTest = new DyTest();
        dyTest.m1(1,2);

        dyTest.m2("select * from admin where username=? and password=?","fender","123");
    }

}
